package com.translate.web.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 映射配置文件
 * @author 111
 *
 */
@Configuration
@ConfigurationProperties(prefix = "executor-config")
@Component
public class TaskExecutorConfig {
	
	/**
	 * 核心线程池数量
	 */
	private int corePoolSize;
	

	/**
	 * 最大核心线程池数量
	 */
	private int maxPoolSize;
	
	/**
	 * 队列容量
	 */
	private int queueCapacity;
	
	public int getCorePoolSize() {
		return corePoolSize;
	}

	public void setCorePoolSize(int corePoolSize) {
		this.corePoolSize = corePoolSize;
	}

	public int getMaxPoolSize() {
		return maxPoolSize;
	}

	public void setMaxPoolSize(int maxPoolSize) {
		this.maxPoolSize = maxPoolSize;
	}

	public int getQueueCapacity() {
		return queueCapacity;
	}

	public void setQueueCapacity(int queueCapacity) {
		this.queueCapacity = queueCapacity;
	}

	public int getKeepAliveTime() {
		return keepAliveTime;
	}

	public void setKeepAliveTime(int keepAliveTime) {
		this.keepAliveTime = keepAliveTime;
	}
	
	/**
	 * 保存时间
	 */
	private int keepAliveTime;
}
